
from rest_framework.generics import ListAPIView
from rest_framework.viewsets import ModelViewSet
from meiduo_admin.paginators import MyPage
from meiduo_admin.serializers.option_serializers import *

# 新建选项可选规格列表视图
class SpecSimpleListView(ListAPIView):
    queryset = SPUSpecification.objects.all()
    serializer_class = SpecSimpleModelSerializer

# 选项序视图集
class OptionViewSet(ModelViewSet):
    queryset = SpecificationOption.objects.all()
    serializer_class = OptionModelSerializer
    pagination_class = MyPage